1. Field of the Invention
The present invention relates to an electronic control device having a volatile memory for storing data therein for use, e.g., in control of an internal combustion engine in an automobile.
2. Description of the Related Art
Data such as a fuel injection amount, an air amount, and an ignition timing, which are used in an internal combustion engine may cause a difference from previously determined data due to fluctuation or deterioration over time. The difference is calculated as errors by a microprocessor in an electronic control device. Based on the calculated results, the errors of the fuel injection amount, the air amount, or the like are corrected. The microprocessor stores values of error correction as error correction data in a volatile memory such as a RAM. Even if an ignition switch is turned off, and electricity is not supplied from a battery to the RAM through a main power supply circuit, electricity is constantly supplied from the battery to the RAM through an auxiliary power supply circuit. Therefore, the RAM retains the error correction data.
The failure condition of components such as an actuator or a sensor used in the internal combustion engine is monitored by the microprocessor. When the microprocessor detects any failures, the microprocessor stores the failure data in the RAM.
The battery for supplying electricity to the electronic control device may be replaced due to deterioration or the like. Further, the battery may be disconnected for initializing the failure data stored in the RAM. When the supply of electricity from the battery through the auxiliary power supply circuit is stopped, depending on the time of interrupting the supply of electricity, data erasure is carried out incompletely. Therefore, the error correction data or the failure data stored in the RAM includes uncertain values. If control of the internal combustion engine is carried out using the error correction data or the failure data including the uncertain values, deterioration in the exhaust gas, or deterioration in drivability may occur. Therefore, when the battery is attached again and the ignition switch is turned on, the microprocessor needs to initialize the RAM.
For example, according to the description (system) of JP 6-250940 A, control data and inverted control data are stored as a pair of data in the RAM. When the supply of electricity from the battery through the auxiliary power supply circuit is stopped, depending on the time of interrupting the supply of electricity, data erasure is carried out incompletely. Therefore, the error correction data stored in the RAM includes uncertain values. At this time, the control data does not match the data obtained by inverting values of the inverted control data. Under the condition, the RAM is initialized.
When the condition for determining the initialization of the RAM in the electronic control device is used, if only part of the data stored in the RAM includes uncertain values created by disconnection of the battery, the control data may match the data obtained by inverting values of the inverted control data. Under the circumstances, the RAM is not initialized. The use of such control data results in deterioration in the exhaust gas or deterioration in drivability.
Further, since both of the control data and the inverted data need to be stored, the required storage capacity of the RAM is twice as much as the volume of the control data.
Further, the process of comparing the control data and the data obtained by inverting values of the inverted data needs to be performed before starting the internal combustion engine after the ignition switch is turned on. Since the entire area of the data in the RAM may need to be compared, considerable time may be required to achieve the condition ready for starting the internal combustion engine.